Vue.component('header-component', {
    // 声明 props
    props: ['field', 'value'],
    template:   '<li class="nav-header">'+   	
				'	<div class="dropdown profile-element">'+ 
				'        <a class ="header-img">'+                  	
				'		     <img alt="image" class="img-circle" src="public/images/favicon.ico" />'+
				'		 </a>'+
				'	</div>'+
				'	<div class="logo-element">曦+</div>'+						  
				'</li>',		      
});


var menuItem = Vue.extend({
    name: 'menu-item',
    props: {item: {}},
    template:   [
        '<li v-if="item.type === 0">'+
        '		<a class="has-arrow waves-effect waves-dark active" href="#" aria-expanded="false"><i class="mdi mdi-gauge"></i><span class="hide-menu">{{menuData[item.name]}} </span></a>'+
        '  	    <ul v-if="item.level == 2" aria-expanded="false" class="collapse">'+
        '			       <menu-item :item="item" v-for="item in item.list"></menu-item>'+
        '	    </ul>'+
        '	    <ul v-else aria-expanded="false" class="collapse">'+
        '		       <menu-item :item="item" v-for="item in item.list"></menu-item>'+
        '		</ul>'+
        '</li>'+
        '<li v-else class="active">'+
        '		 <a :href="item.url" class="menuItem">{{menuData[item.name]}}</a>'+
        '</li>'
    ].join('')
});


Vue.component('menuItem', menuItem);
/*
$(document).ready(function () {
	console.log(111);
    //注册菜单组件
    Vue.component('menuItem', menuItem);
});*/
